
#ifndef UART_H_
#define UART_H_


#include "include.h"


#define UART_Baud          (u32)(115200ul)
#define UART_TXFIFOLength  (u16)(5000u)
#define UART_ClockCmd()    do{RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2, ENABLE);}while(0)



#define UART_ON    (1u)
#define UART_OFF   (0u)
#define UART_SWITCH  (UART_OFF)


typedef struct
{
	u16 u16FIFOFrontIndex;
	u16 u16FIFORearIndex;
	u8  u8FIFOData[UART_TXFIFOLength];
}Uart_TXFIFOType;



extern void Uart_Config(void);
extern void Uart_TxMainFunction(void);
extern void Uart_16BitDataConvertFunction(u16 u16data);
extern void Uart_32BitDataConvertFunction(u32 u32data);
extern void Uart_FIFOStoreFunction(u8*u8Data,u8 Length);






#endif
